home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 4.3 KB | 144 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: EmbedSel.cpp
- // Release Version: $ 1.0d11 $
- //
- // Author: M.Boetcher
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #include "Embed.hpp"
-
- #ifndef EMBEDSEL_H
- #include "EmbedSel.h"
- #endif
-
- #ifndef EMBEDPART_H
- #include "EmbedPar.h"
- #endif
-
- #ifndef EMBEDPROXY_H
- #include "EmbedPxy.h"
- #endif
-
- // ----- Framework Includes -----
-
- #ifndef FWPRESEN_H
- #include "FWPresen.h"
- #endif
-
- //========================================================================================
- // Runtime information
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma segment odfembed
- #endif
-
- //========================================================================================
- // CLASS CEmbedSelection
- //========================================================================================
-
- //---------------------------------------------------------------------------------------
- // CEmbedSelection constructor
- //---------------------------------------------------------------------------------------
-
- CEmbedSelection::CEmbedSelection(Environment* ev, CEmbedPart* embeddingPart) :
- FW_CEmbeddingSelection(ev, FALSE, FALSE),
- fEmbeddingPart(embeddingPart),
- fProxy(NULL)
- {
- }
-
- //---------------------------------------------------------------------------------------
- // CEmbedSelection destructor
- //---------------------------------------------------------------------------------------
-
- CEmbedSelection::~CEmbedSelection()
- {
- }
-
- //---------------------------------------------------------------------------------------
- // CEmbedSelection::CloseSelection
- //---------------------------------------------------------------------------------------
-
- void CEmbedSelection::CloseSelection(Environment* ev)
- {
- // Nothing to do
- }
-
- //---------------------------------------------------------------------------------------
- // CEmbedSelection::ClearSelection
- //---------------------------------------------------------------------------------------
-
- FW_Boolean CEmbedSelection::ClearSelection(Environment* ev)
- {
- FW_Boolean result = FALSE;
-
- if (fProxy) // there is an embedded part - don't delete it, because this action might be undone
- {
- fProxy->DetachEmbeddedFrames(ev);
- fEmbeddingPart->SetProxy(ev, NULL);
- GetPresentation(ev)->Invalidate(ev);
- result = TRUE;
- }
-
- return result;
- }
-
- //---------------------------------------------------------------------------------------
- // CEmbedSelection::SelectAll
- //---------------------------------------------------------------------------------------
-
- void CEmbedSelection::SelectAll(Environment* ev)
- {
- // Nothing to do
- }
-
- //---------------------------------------------------------------------------------------
- // CEmbedSelection::IsEmpty
- //---------------------------------------------------------------------------------------
-
- FW_Boolean CEmbedSelection::IsEmpty(Environment* ev) const
- {
- return (fProxy == NULL);
- }
-
- //---------------------------------------------------------------------------------------
- // CEmbedSelection::DoInternalizeSelection
- //---------------------------------------------------------------------------------------
-
- FW_Boolean CEmbedSelection::DoInternalizeSelection(Environment* ev,
- ODStorageUnit* sourceSU,
- FW_CCloneInfo* cloneInfo)
- {
- FW_UNUSED(sourceSU);
- FW_UNUSED(cloneInfo);
-
- // We need to write code here in case we are dragging an embedpart into another
- // embedpart. Write now we are going to embed the dragged embedpart
-
- return FALSE;
- }
-
- //---------------------------------------------------------------------------------------
- // CEmbedSelection::IsSelectionOnlyOneProxy
- //---------------------------------------------------------------------------------------
-
- FW_MProxy* CEmbedSelection::IsSelectionOnlyOneProxy(Environment* ev) const
- {
- return fProxy;
- }
-
- //----------------------------------------------------------------------------------------
- // CEmbedSelection::SetProxy
- //----------------------------------------------------------------------------------------
-
- void CEmbedSelection::SetProxy(Environment* ev, CEmbedProxy* proxy)
- {
- fProxy = proxy;
- }
-
-